/*
 * @Author: upp24 1246815351@qq.com
 * @Date: 2023-07-08 14:58:39
 * @LastEditors: alan_mf
 * @LastEditTime: 2024-06-18 11:00:44
 * @FilePath: /nuanyunOA_new/src/api/settings.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";
export type BannerResult = {
  page: number;
  pagesize: number;
  success: boolean;
  code: number;
  token: string;
  msg: string;
  data: {
    img(img: any): string;
    data: any[];
    total: number;
    page: number;
    pagesize: number;
  };
};
/**修改密码*/
export const changePassword = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("user/update"), {
    data
  });
};
/**管理员信息 */
export const adminInfo = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("auth/admin/author"), {
    data
  });
};
/**管理员信息修改 */
export const adminInfoEdit = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("auth/admin/update"), {
    data
  });
};
/**系统设置显示*/
export const systemSettings = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("system/list"), {
    data
  });
};
/**系统设置修改*/
export const systemSettingsEdit = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("system/set"), {
    data
  });
};
